NHSR Community Coffee and Coding - Quarto

Zoë Turner

Notebooks

I have a paper notebook with Excel formulae and SQL code from when I first started as an analyst. Code like:

YEAR(DateColumn) * 100 + MONTH(DateColumn)

which gave use the format 202406 in our analysis and

SUBSTRING(xxx, CHARINDEX('x', xxx), 4)

find x in column xxx and return 4 characters

Writing and searching

Fast forward a few years when I was learning R

I realised I couldn’t search for things like I could like SQL

Girl at a very old computer typing and the screen says GOOGLE and the code returns SYNTAX ERROR

because I didn’t know what things were called!

Writing code and text

And whilst I was keeping notes on code there was all the other context and methodology information

Kermit the frog frantically typing on a typewriter

And this was kept on Sharepoint which was restricted access

DRY

Don’t Repeat Yourself

well I was doing that all the time

Alexis Rose from Schitt's Creek saying 'Ugh, no I'm trying to learn from my mistakes - before making new ones'

And making mistakes

Requirements

A solution needed to be:

  • Shareable
  • Searchable
  • Flexible
  • Combine code and text

The solution

I started off with a book

I ended up with a book

Actually I ended up with several books

NHS-R Community Quarto website book page

NHS-R Community Quarto website book page

And there is more

Cartoon of nesting dolls that open up until the smallest and then return back to the largest

Quarto solutions

Books, presentation slides and blogs lead to websites like this from the Royal Statistical Society

Which lead to data science solutions like GitHub actions and Docker

The end…

And many, many mistakes (also known as trial and error!)

Screenshot of the 25 failed GitHub Action commits I made to trying to get a book to publish using the CNAME redirect to NHSR Community dot com

Thanks

To Matt Dray for {quartostamp} because I always forget what’s possible in Quarto and how to write the code!